home *** CD-ROM | disk | FTP | other *** search
/ Wonky Flux Batch 2019 02 / Wonky_Flux_Batch_2019-02.zip / Wonky Flux Batch 2019-02 / 093 - Land of Spur.dsk / SPUR.SYSOP.S < prev    next >
Text File  |  2019-02-17  |  26KB  |  877 lines

  1.                          ; _  _  _  _  _  _  _  _ 
  2.                          ;[_][_][_][_][_][_][_][_]
  3.                          ;
  4.                          ;     The Land of SPUR
  5.                          ;
  6.                          ;     (C)opyright 1987
  7.                          ;       Greg W. Davis
  8.                          ;            and
  9.                          ;     Peripherals Plus
  10.                          ;
  11.                          ; 03/14/87          23:14
  12.                          ; _______________________
  13.                          ;          v3.0
  14.                          ;      Sysop Segment
  15.                          ; _  _  _  _  _  _  _  _
  16.                          ;[_][_][_][_][_][_][_][_]
  17.  
  18.  
  19.           on nocar goto linkterm
  20.  
  21.           public relink
  22.           
  23. main
  24.           input \"SPUR Sysop (?=Menu): "i$
  25.           push main
  26.  
  27.           if i$="A" goto allie0
  28.           if i$="I" goto item0
  29.           if i$="M" goto monster0
  30.           if i$="W" goto weapon0
  31.           if i$="S" goto spell0
  32.           if i$="F" goto food0
  33.           if i$="P" goto player0
  34.           if i$="L" pop:goto levels
  35.           if i$="R" pop:goto room0
  36.           if i$="D" goto log
  37.           if i$="Q" goto quit
  38.           if i$="U" pop:dy$=ds$+"spur.util":link dy$
  39.           if i$="*" pop:dy$=ds$+"spur.control":link dy$
  40.           if i$<>"?" return
  41.  
  42. menu
  43.           setint(1):print \s$\'
  44. [------------------------------------]
  45. [                Sysop Maintenance Menu      ]
  46. [------------------------------------]
  47. [              [D] Display SPUR Log          ]
  48. [              [U] Spur Sysop Utilities      ]
  49. [              [*] Spur Sysop Control        ]
  50. [                                            ]
  51. [            [P]layers         [S]pells      ]
  52. [            [I]tems           [M]onsters    ]
  53. [            [W]eapons         [A]llies      ]
  54. [            [L]evels          [F]ood/Drink  ]
  55. [            [R]ooms           [Q]uit        ]
  56. [                                            ]
  57. [------------------------------------]':setint(""):return
  58.  
  59. player0
  60.           dy$=dx$+"spur.users"
  61. players
  62.           print \"[ PLAYERS ]"
  63.           input \"[L]ist [E]dit [K]ill or [Q]uit: "i$
  64.           if i$="K" goto player2
  65.           if i$="Q" return
  66.           if i$="L" xl$="listplyr":gosub link.sys
  67.           if i$<>"E" goto players
  68. player2
  69.           input @2\"Player # (CR=Abort): "x$:if x$="" goto players
  70.           x=val(x$):if (x<1) or (x>np) print \"Players from 1 to "np" only.":goto player2
  71.           if i$="K" goto kil.plyr
  72.  
  73. ed.plr
  74.           if x=pn gosub pull:goto ed.plr1
  75.           gosub rd.plr
  76.           if not b1 print \"No such Player.":goto players
  77. ed.plr1
  78.           print \"User #"b1" Player #"b2"  Name: "n$
  79.           print "A:Strength     :"n1
  80.           print "B:Constitution :"n2
  81.           print "C:Intelligence :"n3
  82.           print "D:Energy       :"n4
  83.           print "E:Wisdom       :"n5
  84.           print "F:Dexterity    :"n6
  85.           print "G:Shield       :"s
  86.           print "H:Armor        :"a
  87.           g1=g5:g2=g6:gosub prt.gold:print "I:Gold in bank :"gd$
  88.           g1=g3:g2=g4:gosub prt.gold:print "J:Gold in hand :"gd$
  89.           print "K:Experience   :"m1
  90.           print "L:Player Level :"m4
  91.           print "M:Kills        :"m2
  92.           print "N:Hit Points   :"b3\
  93. ed.plr2
  94.           input @2\"Edit (A-N): " i$ 
  95.           
  96. ed.cont
  97.           if i$="A" input @1\"Strength: "a$:gosub check:n1=i
  98.           if i$="B" input @1\"Constitution: "a$:gosub check:n2=i
  99.           if i$="C" input @1\"Intelligence: "a$:gosub check:n3=i
  100.           if i$="D" input @1\"Energy: "a$:gosub check:n4=i
  101.           if i$="E" input @1\"Wisdom: "a$:gosub check:n5=i
  102.           if i$="F" input @1\"Dexterity: "a$:gosub check:n6=i
  103.           if i$="G" input @1\"Shield: "a$:gosub check2:s=i
  104.           if i$="H" input @1\"Armor: "a$:gosub check2:a=i
  105.           if i$="I" input @1\"Gold in Bank: "a$:gosub check4
  106.           if i$="J" input @1\"Gold in Hand: "a$:gosub check4
  107.           if i$="K" input @1\"Experience: "m1
  108.           if i$="L" input @1\"Player Level: "m4
  109.           if i$="M" input @1\"Kills: "m2
  110.           if i$="N" input @1\"Hit Points: "a$:gosub check5:b3=i
  111.           if i$<>"" goto ed.plr1
  112.           
  113. play.sav
  114.           input @0\"[S]ave [R]eturn [A]bort: "i$
  115.           if i$="A" goto players
  116.           if i$="R" goto ed.plr1
  117.           if i$<>"S" goto play.sav
  118.           if x<>pn gosub wr.plr:goto players
  119.           hp=b3:n1$=n$:ps=n1:pt=n2:pi=n3:pe=n4:pw=n5:pd=n6
  120.           sh=s:ar=a:gh=g3:gl=g4:bh=g5:bl=g6:ep=m1:mk=m2:mm=m3:xp=m4:goto players
  121.  
  122. check
  123.           i=val(a$):if (i<1) or (i>25) print \"25 pts. max.":pop:goto ed.cont
  124.           return
  125. check2
  126.           i=val(a$):if (i<0) or (i>100) print \"100 pts. max.":pop:goto ed.cont
  127.           return
  128. check4
  129.           if len(a$)>9 print \"Invalid amount":pop:goto ed.cont
  130.           for i=1 to len(a$):b=instr(mid$(a$,i,1),"0123456789")
  131.           if b=0 then i=len(a$):print \"Invalid amount":next:pop:goto ed.cont
  132.           next
  133.           if i$="I" then gd$=a$:gosub spl.gold:g5=g1:g6=g2
  134.           if i$="J" then gd$=a$:gosub spl.gold:g3=g1:g4=g2
  135.           return
  136. check5
  137.           i=val(a$):if (i<1) or (i>25) print \"25 pts. max.":pop:goto ed.cont
  138.           return
  139.  
  140. pull
  141.           b1=sn:b2=pn:b3=hp:n$=n1$:n1=ps:n2=pt:n3=pi:n4=pe:n5=pw:n6=pd
  142.           s=sh:a=ar:g3=gh:g4=gl:g5=bh:g6=bl:m1=ep:m2=mk:m3=mm:m4=xp:return
  143.  
  144. rd.plr
  145.           open #1,dy$
  146.           position #1,130,x
  147.           input #1,n$,b1,b2,n7,n8,b3
  148.           input #1,n1,n2,n3,n4,n5,n6
  149.           input #1,g3,g4,g5,g6,s,a,z1,z2,m1,m2,m3,m4
  150.           input #1,p1$
  151.           close:return
  152.  
  153. wr.plr
  154.           open #1,dy$
  155.           position #1,130,x
  156.           print #1,n$,b1,b2,n7,n8,b3
  157.           print #1,n1,n2,n3,n4,n5,n6
  158.           print #1,g3,g4,g5,g6,s,a,z1,z2,m1,m2,m3,m4
  159.           print #1,p1$
  160.           close:return
  161.  
  162. kil.plyr
  163.           gosub rd.plr
  164.           if not b1 print \"Player does not exist":goto players
  165.           print \"Player #"x
  166.           print "Name    "n$\
  167.           input @0 "Remove Player from game? "i$
  168.           if i$<>"Y" goto players
  169.           b1=0:gosub wr.plr
  170.           
  171.           dy$=dx$+"weapons":dw$=dx$+"spur.weapons"
  172.           open #1,dy$:open #2,dw$
  173.           position #2,64,x
  174.           input #2,a,i$
  175.           if a=0 close:goto kill.pl2
  176.           for j=1 to a
  177.           y=val(i$):i$=mid$(i$,5)
  178.           if y>10 position #1,34,y:print #1,"1"
  179.           next:close
  180.           
  181. kill.pl2
  182.           dy$=dx$+"allies":dw$=dx$+"spur.allies"
  183.           open #1,dy$:open #2,dw$
  184.           position #2,78,x
  185.           for j=1 to 3
  186.           input #2,x1$,x1,x2
  187.           position #1,26,x2
  188.           if x2<>0 print #1,1
  189.           next:close
  190.           goto player0
  191.  
  192. food0
  193.           dy$=dx$+"stores":xl$="listfood":xc=cg:xn$="RATIONS":open #1,dy$
  194. food
  195.           gosub edpmt
  196.           if i$="A" goto nw.food
  197.           if (i$<>"E") and (i$<>"K") goto food
  198.           push food
  199.           
  200.           gosub getnum:pop
  201.           if i$="E" goto ed.food
  202.  
  203. kl.food
  204.           gosub rd.food
  205.           print \"Kill "xn$" #"x
  206.           print "Named: "gs$;:input @0 "? "i$
  207.           if i$<>"Y" goto food
  208.           cb$="*" gosub wr.food:goto food
  209.  
  210. nw.food
  211.           print \"Searching...."
  212.           x=1
  213. nw.food2
  214.           gosub rd.food
  215.           if (cb$="") or (cb$="*") goto nw.food3
  216.           x=x+1:if x=1000 print \"No room in "xn$" file!":goto food
  217.           goto nw.food2
  218. nw.food3
  219.           print \"Open slot found at #"x:if x<11 then cb$="2":else cb$="1"
  220.           gosub ed.f.nam:if gs$="" goto food.cnc
  221.           gosub ed.f.cst
  222.           gosub ed.f.typ
  223.           goto food.sav
  224.  
  225. ed.food
  226.           gosub rd.food
  227.           if (cb$="") or (cb$="*") push food:goto ed.none
  228. ed.food2
  229.           print \xn$" # "x
  230.           print"A. Name: "gs$
  231.           print"B. Cost: "gs
  232.           print"C. Type: "ty$"-";
  233.           if ty$="F" print "Food"
  234.           if ty$="D" print "Drink"
  235.           if ty$="C" print "Cursed"
  236.           input @2\"Edit (A-C) - [?=Types]: "i$
  237.  
  238. ed.food3
  239.           if i$="A" gosub ed.f.nam:if gs$="" goto ed.food3
  240.           if i$="B" gosub ed.f.cst
  241.           if i$="C" gosub ed.f.typ
  242.           if i$="?" gosub f.types
  243.           if i$<>"" goto ed.food2
  244.           
  245. food.sav
  246.           input \"[S]ave [A]bort [R]eturn: "i$
  247.           if i$="R" goto ed.food2
  248.           if i$="A" goto food
  249.           if i$<>"S" goto food.sav
  250.           if x>cg then cg=x:xc=x
  251.           gosub wr.food:goto food
  252.           
  253. ed.f.nam
  254.           print \xn$     ;:input @2" (18 chrs.): "gs$:if len(gs$)>18 goto ed.f.nam
  255.           return
  256.           
  257. ed.f.cst
  258.           print \"Cost of "xn$;:input " (1-99): "gs:if (gs<1) or (gs>99) goto ed.f.cst
  259.           return
  260.           
  261. ed.f.typ
  262.           input @0\"Type: "ty$:if ty$="?" gosub f.types:goto ed.f.typ
  263.           a=instr(ty$,"FDC"):if (not a) print \"Invalid type":goto ed.f.typ
  264.           if (ty$="C") and (x<11) print \"Rations 1-10 can not be Cursed":goto ed.f.typ
  265.           return
  266.  
  267. food.cnc
  268.           print \xn$" add cancelled.":goto food
  269.           
  270. f.types
  271.           print \'Valid Ration Types:
  272.           
  273. F         = Food   D = Drink   C = Cursed':return
  274.           
  275. rd.food
  276.           position #1,26,x
  277.           input #1,cb$\gs$\gs
  278.           ty$=left$(gs$,1):gs$=mid$(gs$,3)
  279.           return
  280.  
  281. wr.food
  282.           gs$=ty$+"."+gs$
  283.           position #1,26,x
  284.           print #1,cb$\gs$\gs
  285.           return
  286.  
  287. spell0
  288.           dy$=dx$+"spells":xl$="listspel":xc=sc:xn$="SPELLS":open #1,dy$
  289. spells
  290.           gosub edpmt
  291.           if i$="A" goto nw.spel
  292.           if (i$<>"E") and (i$<>"K") goto spells
  293.           push spells
  294.           
  295.           gosub getnum:pop
  296.           if i$="E" goto ed.spel
  297.  
  298. kil.spel
  299.           gosub rd.spel
  300.           print \"Kill Spell #"x
  301.           print "Named "q$;:input @0 "? "i$
  302.           if i$<>"Y" goto spells
  303.           cb$="*":gosub wr.spel:goto spells
  304.  
  305. nw.spel
  306.           print \"Searching..."
  307.           x=1
  308. nw.spel2
  309.           gosub rd.spel
  310.           if (cb$="") or (cb$="*") goto nw.spel3
  311.           x=x+1:if x=1000 print \"No room in the "xn$" file.":goto spells
  312.           goto nw.spel2
  313. nw.spel3
  314.           print \"Open slot found at #"x:cb$="1"
  315.           gosub ed.s.nam:if q$="" goto spel.cnc
  316.           gosub ed.s.typ
  317.           gosub ed.s.suc
  318.           gosub ed.s.cst
  319.           goto spel.sav
  320.  
  321. ed.spel
  322.           gosub rd.spel
  323.           if (cb$="") or (cb$="*") push spells:goto ed.none
  324. ed.spel2
  325.           print \"Spell # "x
  326.           print "A: Name    : "q$
  327.           print "B: ID      : "q2$
  328.           print "C: Success : "q3"0%"
  329.           print "D: Cost    : "q4" gold"\
  330.           input @2\"Edit (A-D): "i$
  331.           
  332. ed.spel3
  333.           if i$="A" gosub ed.s.nam:if q$="" goto ed.spel3
  334.           if i$="B" gosub ed.spl2b
  335.           if i$="C" gosub ed.s.suc
  336.           if i$="D" gosub ed.s.cst
  337.           if i$<>"" goto ed.spel2
  338.           
  339. spel.sav
  340.           input \"[S]ave [A]bort [R]eturn: "i$
  341.           if i$="A" goto spells
  342.           if i$="R" goto ed.spel2
  343.           if i$<>"S" goto spel.sav
  344.           if x>sc then sc=x:xc=x
  345.           gosub wr.spel:goto spells
  346.  
  347. ed.spl2b
  348.           input @0\"Type of Spell (?=List): "a$:if a$="?" gosub listtype:goto ed.spl2b
  349.           if not instr(a$,"PMSWEICDLTURGA") goto ed.spl2b
  350.           
  351. ed.spl2c
  352.           input \"Point Determinator (1-9): "b$:if (b$<"1") or (b$>"9") goto ed.spl2c
  353. ed.spl2e
  354.           q2$=a$+b$:return
  355.  
  356. listtype
  357.           print \'
  358. Spell     Types:
  359.  
  360. (P)layer       (M)onster
  361. (S)trength    (C)onstitution
  362. (E)nergy       (I)ntelligence
  363. (W)isdom       (D)exterity
  364. (L)evel-Down  (T)ransfer
  365. (U)p-Level    (R)eturn to Shop
  366. (G)et     SPUR    (A)ura'\:return
  367.           
  368. ed.s.nam
  369.           input @2\"Name (20 chrs.): "q$:if len(q$)>20 goto ed.s.nam
  370.           return
  371.           
  372. ed.s.typ
  373.           gosub ed.spl2b
  374.           return
  375.           
  376. ed.s.suc
  377.           input \"Success (1-9): "q3:if (q3<1) or (q3>9) goto ed.s.suc
  378.           return
  379.           
  380. ed.s.cst
  381.           input \"Cost (1-30000): "q4:if (q4<1) or (q4>30000) goto ed.s.cst
  382.           return
  383.           
  384. spel.cnc
  385.           print \xn$" add cancelled":goto spells
  386.  
  387. rd.spel
  388.           position #1,40,x
  389.           input #1,cb$\q$,q2$,q3,q4
  390.           return
  391.  
  392. wr.spel
  393.           position #1,40,x
  394.           print #1,cb$\q$,q2$,q3,q4
  395.           return
  396.  
  397. monster0
  398.           dy$=dx$+"monsters":xl$="listmons":xc=mc:xn$="MONSTERS":open #1,dy$
  399. monsters
  400.           gosub edpmt
  401.           if i$="A" goto nw.mons
  402.           if (i$<>"E") and (i$<>"K") goto monsters
  403.           push monsters
  404.           
  405.           gosub getnum:pop
  406.           if i$="E" goto ed.mons
  407.  
  408. kil.mons
  409.           gosub rd.mons
  410.           print \"Kill "xn$" #"x
  411.           print "Named "m$;:input @0 "? "i$
  412.           if i$<>"Y" goto monsters
  413.           cb$="*":gosub wr.mons:goto monsters
  414.           
  415. nw.mons
  416.           print \"Searching......"
  417.           x=1
  418. nw.mons2
  419.           gosub rd.mons
  420.           if (cb$="") or (cb$="*") goto nw.mons3
  421.           x=x+1:if x=1000 print \"No room for adding "xn$:goto monsters
  422.           goto nw.mons2
  423. nw.mons3
  424.           print \"Open slot found at #"x:cb$="1"
  425.           gosub ed.m.nam:if m$="" goto mons.cnc
  426.           gosub ed.m.str
  427.           gosub ed.m.swp
  428.           goto mons.sav
  429.  
  430. ed.mons
  431.           gosub rd.mons
  432.           if (cb$="") or (cb$="*") push monsters:goto ed.none
  433. ed.mons2
  434.           print \xn$" # "x
  435.           print \"A: Name      : "m$
  436.           print "B: Strength  : "ms
  437.           print "C: Spec Wep #: "sw
  438.           input @2\"Edit (A-C): "i$
  439.  
  440. ed.mons3
  441.           if i$="A" gosub ed.m.nam:if m$="" goto ed.mons3
  442.           if i$="B" gosub ed.m.str
  443.           if i$="C" gosub ed.m.swp
  444.           if i$<>"" goto ed.mons2
  445.           
  446. mons.sav
  447.           input \"[S]ave [R]eturn [A]bort: "i$
  448.           if i$="A" goto monsters
  449.           if i$="R" goto ed.mons2
  450.           if i$<>"S" goto mons.sav
  451.           if x>mc then mc=x:xc=x
  452.           gosub wr.mons:goto monsters
  453.           
  454. ed.m.nam
  455.           print \xn$     ;:input @2" (18 chrs.): "m$:if len(m$)>18 goto ed.m.nam
  456.           ty$="M"
  457.           return
  458.           
  459. ed.m.str
  460.           print \xn$     ;:input @2" strength (1-18): "ms
  461.           if (ms<1) or (ms>18) goto ed.m.str
  462.           return
  463.           
  464. ed.m.swp
  465.           input @0\ "Special Weapon Required? "i$
  466.           if i$<>"Y" then sw=0:return
  467.           print \"Special Weapon (1-"wc"): ";:input sw
  468.           if (sw<1) or (sw>wc) goto ed.m.swp
  469.           return
  470.           
  471. mons.cnc
  472.           print \xn$" add cancelled.":goto monsters
  473.  
  474. rd.mons
  475.           position #1,32,x
  476.           input #1,cb$\m$\ms,sw
  477.           ty$=left$(m$,1):m$=mid$(m$,3)
  478.           return
  479.  
  480. wr.mons
  481.           zz$=rnd$:ma=random(9)
  482.           m$=ty$+"."+m$
  483.           position #1,32,x
  484.           print #1,cb$\m$\ms,sw\ma
  485.           return
  486.  
  487. item0
  488.           dy$=dx$+"items":xl$="listitem":xc=ic:xn$="ITEMS":open #1,dy$
  489. items
  490.           gosub edpmt
  491.           if i$="A" goto nw.item
  492.           if (i$<>"E") and (i$<>"K") goto items
  493.           push items
  494.           
  495.           gosub getnum:pop
  496.           if i$="E" goto ed.item
  497.  
  498. kil.item
  499.           gosub rd.item
  500.           print \"Kill "xn$" # "x
  501.           print "Named "it$;:input @0 "? "i$
  502.           if i$<>"Y" goto items
  503.           cb$="*":gosub wr.item:goto items
  504.  
  505. nw.item
  506.           print \"Searching..."
  507.           x=1
  508. nw.item2
  509.           gosub rd.item
  510.           if (cb$="") or (cb$="*") goto nw.item3
  511.           x=x+1:if x=1000 print \"No room in "xn$" file.":goto items
  512.           goto nw.item2
  513. nw.item3
  514.           print \"Open slot found at #"x:cb$="1":if x<6 then cb$="2"
  515.           gosub ed.i.nam:if it$="" goto item.cnc
  516.           gosub ed.i.typ
  517.           gosub ed.i.val
  518.           goto item.sav
  519.  
  520. ed.item
  521.           gosub rd.item
  522.           if (cb$="") or (cb$="*") push items:goto ed.none
  523. ed.item2
  524.           print \"Item # "x
  525.           print \"A:  Name : "it$
  526.           print "B:  Type : "ty$"-";
  527.           if ty$="T" print "Treasure";
  528.           if ty$="C" print "Cursed Item";
  529.           if ty$="B" print "Book";
  530.           if ty$="A" print "Armor";
  531.           if ty$="S" print "Shield";
  532.           if ty$="P" print "Compass";
  533.           print \"C: Value : "it\
  534.           input @2 "Edit (A-C) - [?=Types]: "i$
  535.  
  536. ed.item3
  537.           if i$="A" gosub ed.i.nam:if it$="" goto ed.item3
  538.           if i$="B" gosub ed.i.typ
  539.           if i$="C" gosub ed.i.val
  540.           if i$="?" gosub types
  541.           if i$<>"" goto ed.item2
  542.           
  543. item.sav
  544.           if ty$="B" input @0\"Write or Edit book now? "i$:if i$="Y" gosub wr.book
  545.           input \"[S]ave [R]eturn [A]bort: "i$
  546.           if i$="A" goto items
  547.           if i$="R" goto ed.item2
  548.           if i$<>"S" goto item.sav
  549.           if x>ic then ic=x:xc=x
  550.           if (ty$="A") and (not instr("ARMOR",it$)) print \"Word 'ARMOR' must appear in name!":goto ed.item2
  551.           if (ty$="S") and (not instr("SHIELD",it$)) print \"Word 'SHIELD' must appear in name!":goto ed.item2
  552.           gosub wr.item:goto items
  553.           
  554. ed.i.nam
  555.           print \xn$" name: (20 chrs.): ";:input @2 it$:if len(it$)>20 goto ed.i.nam
  556.           if x>5 return
  557.           if (x=1) and (not instr("COMPASS",it$)) print \"Item 1 MUST be a COMPASS.":goto ed.i.nam
  558.           if x=1 return
  559.           if (not instr("ARMOR",it$)) and (not instr("SHIELD",it$)) print \'
  560. Items     2-5 must be either ARMOR
  561. or        SHIELD':goto ed.i.nam
  562.           return
  563.           
  564. ed.i.typ
  565.           if instr("COMPASS",it$) then ty$="P":return
  566.           if instr("ARMOR",it$) then ty$="A":return
  567.           if instr("SHIELD",it$) then ty$="S":return
  568.           input @0\"Type: "ty$:if ty$="?" gosub types:goto ed.i.typ
  569.           a=instr(ty$,"PTCBAS"):if (not a) print \"Invalid type":goto ed.i.typ
  570.           return
  571.           
  572. ed.i.val
  573.           print \xn$" value (Max. 9): ";:input it:if (it<1) or (it>9) goto ed.i.val
  574.           return
  575.           
  576. item.cnc
  577.           print \xn$" add cancelled.":goto items
  578.           return
  579.           
  580. types
  581.           print \'Valid Item Types:
  582.  
  583. T         = Treasure        C = Cursed Item
  584. B         = Book            A = Armor
  585. S         = Shield          P = Compass':return
  586.  
  587. wr.book
  588.           bk$=dx$+"spur.books":ready bk$
  589.           input #msg(x),n$
  590.           edit(0):copy #6,#8
  591.           if not edit(2) goto wr.book3
  592. wr.book2
  593.           print \"Edit book: "n$;:input @0"? "a$:if a$<>"Y" return
  594. wr.book3
  595.           print \'
  596. You       may edit or write your book now,
  597. 4k        max. Type [ done ] when finished.'
  598.  
  599. wr.book4
  600.           edit(1)
  601.           if edit(2)>3900 print \"Your book is too long, please shorten.":goto wr.book4
  602.           if not edit(2) print #8,"[ Un-readable! ]"
  603.           print \"Saving book..."
  604.           a=msg(x):kill #msg(x):print #msg(x),it$
  605.           copy #8,#6
  606.           msg(x)=a:update
  607.           return
  608.  
  609. rd.item
  610.           position #1,30,x
  611.           input #1,cb$\it$\it
  612.           ty$=left$(it$,1):it$=mid$(it$,3)
  613.           return
  614.  
  615. wr.item
  616.           it$=ty$+"."+it$
  617.           position #1,30,x
  618.           print #1,cb$\it$\it
  619.           return
  620.  
  621. weapon0
  622.           dy$=dx$+"weapons":xl$="listwep":xc=wc:xn$="WEAPONS":open #1,dy$
  623.           position #1,34,0
  624.           input #1,nw
  625. weapons
  626.           wk=0
  627.           gosub edpmt
  628.           if i$="A" goto nw.wep
  629.           if (i$<>"E") and (i$<>"K") goto weapons
  630.           push weapons
  631.  
  632.           gosub getnum:pop
  633.           if i$="E" goto ed.wep
  634.  
  635. kil.wep
  636.           gosub rd.wep:if cb$="*" print \"No weapon there":goto weapons
  637.           print \"Kill "xn$" # "x
  638.           print "Named "w$;:input @0 "? "i$
  639.           if i$<>"Y" goto weapons
  640.           if cb$="2" then nw=nw-1
  641.           cb$="*":gosub wr.wep:goto weapons
  642.  
  643. nw.wep
  644.           print \"Searching...."
  645.           x=1
  646. nw.wep2
  647.           gosub rd.wep
  648.           if (cb$="") or (cb$="*") goto nw.wep3
  649.           x=x+1:if x=1000 print \"No room in "xn$" file.":goto weapons
  650.           goto nw.wep2
  651. nw.wep3
  652.           print \"Open slot found at # "x:if x<=10 then cb$="2":else cb$="1"
  653.           gosub ed.w.nam:if w$="" goto weap.cnc
  654.           gosub ed.w.typ
  655.           gosub ed.w.stb
  656.           gosub ed.w.dam
  657.           gosub ed.w.cst
  658.           if x<=10 then wk=1
  659.           goto weap.sav
  660.  
  661. ed.wep
  662.           gosub rd.wep
  663.           if (cb$="") or (cb$="*") push weapons:goto ed.none
  664. ed.wep2
  665.           print \"Weapon # "x
  666.           print "A:     Name : "w$
  667.           print "B:    Class : ";:if ty$="M" print "Magical":else ty$="S":print "Standard"
  668.           print "C: Stabilty : "s"0%"
  669.           print "D:   Damage : "d"0%"
  670.           print "E:     Cost : "v" gold"\
  671.           input @2\"Edit (A-E): "i$
  672.  
  673. ed.wep3
  674.           if i$="A" gosub ed.w.nam:if w$="" goto ed.wep3
  675.           if i$="B" gosub ed.w.typ
  676.           if i$="C" gosub ed.w.stb
  677.           if i$="D" gosub ed.w.dam
  678.           if i$="E" gosub ed.w.cst
  679.           if i$<>"" goto ed.wep2
  680.           
  681. weap.sav
  682.           input \"[S]ave [R]eturn [A]bort: "i$
  683.           if i$="A" goto weapons
  684.           if i$="R" goto ed.wep2
  685.           if i$<>"S" goto weap.sav
  686.           if x>wc then wc=x:xc=x
  687.           if wk=1 then nw=nw+1
  688.           gosub wr.wep:goto weapons
  689.           
  690. ed.w.nam
  691.           input @2\"Name (18 chrs.): "w$:if len(w$)>18 goto ed.w.nam
  692.           return
  693.           
  694. ed.w.typ
  695.           input @0\"Class: "ty$:if ty$="?" gosub w.types:goto ed.w.typ
  696.           a=instr(ty$,"MSC"):if (not a) print \"Invalid Class":goto ed.w.typ
  697.           if (ty$="C") and (x<11) print \"Weapons 1-10 can not be Cursed":goto ed.w.typ
  698.           return
  699.           
  700. ed.w.stb
  701.           input \"Stability (5-9): "s:if (s<5) or (s>9) goto ed.w.stb
  702.           return
  703.           
  704. ed.w.dam
  705.           input \"Damage (3-9): "d:if (d<3) or (d>9) goto ed.w.dam
  706.           return
  707.           
  708. ed.w.cst
  709.           input \"Cost (1-9999): "v:if (v<1) or (v>9999) goto ed.w.cst
  710.           return
  711.           
  712. weap.cnc
  713.           print \nx$" add cancelled.":goto weapons
  714.           
  715. w.types
  716.           print \'Valid Weapon Classes:
  717.           
  718. M         = Magical  S = Standard  C = Cursed':return
  719.  
  720. rd.wep
  721.           position #1,34,x
  722.           input #1,cb$\w$\s,d,v
  723.           ty$=left$(w$,1):w$=mid$(w$,3)
  724.           return
  725.  
  726. wr.wep
  727.           zz$=rnd$:wa=random(9)
  728.           w$=ty$+"."+w$
  729.           position #1,34,x
  730.           print #1,cb$\w$\s,d,v\wa
  731.           return
  732.  
  733. allie0
  734.           dy$=dx$+"allies":xl$="listally":xc=ac:xn$="ALLIES":open #1,dy$
  735. allies
  736.           gosub edpmt
  737.           if i$="A" goto nw.ally
  738.           if (i$<>"E") and (i$<>"K") goto allies
  739.           push allies
  740.  
  741.           gosub getnum:pop
  742.           if i$="E" goto ed.ally
  743.  
  744. kl.ally
  745.           gosub rd.ally:if cb$="*" print \"No "xn$" found.":goto allies
  746.           print \"Kill "xn$" # "x
  747.           print "Named: "x1$;:input @0 "? "i$
  748.           if i$<>"Y" goto allies
  749.           cb$="*":gosub wr.ally:goto allies
  750.  
  751. nw.ally
  752.           print \"Searching..."
  753.           x=1
  754. nw.ally2
  755.           gosub rd.ally
  756.           if (cb$="") or (cb$="*") goto nw.ally3
  757.           x=x+1:if x=1000 print \"No room in "xn$" file."goto allies
  758.           goto nw.ally2
  759. nw.ally3
  760.           print \"Open slot found at #"x:cb$="1"
  761.           gosub ed.a.nam:if x1$="" goto ally.cnc
  762.           gosub ed.a.str
  763.           gosub ed.a.hit
  764.           goto ally.sav
  765.  
  766. ed.ally
  767.           gosub rd.ally
  768.           if (cb$="") or (cb$="*") push allies:goto ed.none
  769. ed.ally2
  770.           print \"A: Ally Name    : "x1$
  771.           print "B: Ally Strength: "x2
  772.           print "C: Ally Hit     : "x3"0%
  773.           input @2\"Edit (A-C)? "i$
  774.           
  775. ed.ally3
  776.           if i$="A" gosub ed.a.nam:if x1$="" goto ed.ally3
  777.           if i$="B" gosub ed.a.str
  778.           if i$="C" gosub ed.a.hit
  779.           if i$<>"" goto ed.ally2
  780.           
  781. ally.sav
  782.           input \"[S]ave [A]bort or [R]eturn? "i$
  783.           if i$="A" goto allies
  784.           if i$="R" goto ed.ally2
  785.           if i$<>"S" goto ally.sav
  786.           if x>ac then ac=x:xc=x
  787.           gosub wr.ally:goto allies
  788.           
  789. ed.a.nam
  790.           input @2\"New Ally Name (18 chrs.): "x1$:if len(x1$)>18 goto ed.a.nam
  791.           return
  792.           
  793. ed.a.str
  794.           input \"Strength (1-20): "x2:if (x2<1) or (x2>20) goto ed.a.str
  795.           return
  796.           
  797. ed.a.hit
  798.           input \"Hit % (1-9): "x3:if (x3<1) or (x3>9) goto ed.a.hit
  799.           return
  800.           
  801. ally.cnc
  802.           print \xn$" add cancelled.":goto allies
  803.  
  804. rd.ally
  805.           position #1,26,x
  806.           input #1,cb$\x1$\x2,x3
  807.           return
  808.  
  809. wr.ally
  810.           position #1,26,x
  811.           print #1,cb$\x1$\x2,x3
  812.           return
  813.  
  814. room0
  815.           xl$="room0":gosub link.sys:goto main
  816.  
  817. levels
  818.           xl$="levels":gosub link.sys:goto main
  819.           
  820. edpmt
  821.           print \"[ "xn$" ]"
  822.           input \"[L]ist [E]dit [A]dd [K]ill or [Q]uit: "i$
  823.           if i$="L" close:gosub link.sys:i$="L":open #1,dy$
  824.           if i$<>"Q" return
  825.           if xn$="WEAPONS" position #1,34,0:print #1,nw
  826.           pop:close:return
  827.           
  828. getnum
  829.           print \xn$     ;:input @2 " #: "x$:x=val(x$):if x$="" pop:return
  830.           if (x<1) or (x>xc) print \xn$" from 1 to "xc" only.":pop:return
  831.           return
  832.           
  833. ed.none
  834.           print \"# "x" not defined.":return
  835.           
  836. prt.gold
  837.           a$=str$(g1):gd$="0000":if g1=0 then gd$="    ":a$=" "
  838.           gd$=right$("    "+a$,5)+right$(gd$+str$(g2),4)
  839.           return
  840.           
  841. spl.gold
  842.           gd$=right$("000000000"+gd$,9)
  843.           g1=val(left$(gd$,5)):g2=val(right$(gd$,4))
  844.           return
  845.           
  846. fre.ally
  847.           dy$=dx$+"allies":open #1,dy$
  848.           position #1,26,a
  849.           print #1,1:return
  850.           
  851. log
  852.           f$=dx$+"spur.log"
  853. log2
  854.           print \"[S]how, [D]elete, [Q]uit:";
  855.           input " "i$
  856.           if i$="S" gosub show.file:goto log2
  857.           if i$="D" kill f$:return
  858.           if i$="Q" return
  859.           goto log2
  860.  
  861. show.file
  862.           setint(1):print \s$\:copy f$:setint(""):return
  863.           
  864. link.sys
  865.           f$=ds$+"spur.control":link f$,"list"
  866.           
  867. relink
  868.           return
  869.           
  870. quit
  871.           pop:dy$=dz$+"spur.logon"
  872.           dw$=dz$+"spur.shop"
  873.           if (not cr) link dw$:else link dy$,"login2"
  874.  
  875. linkterm
  876.           dy$=dz$+"spur.logon":link dy$,"quit3"
  877.